<template>
  <div class="box">
    <h1>Child</h1>
    <!-- 
      v-bind:批量传递props
      v-on:批量绑定自定义事件
     -->
    <Grandson v-bind="$attrs" v-on="$listeners" />
  </div>
</template>

<script>
import Grandson from "./Grandson";
export default {
  name: "Child",
  props: ["count", "getData1"],
  mounted() {
    console.log(this.$attrs, "attrs");
    console.log(this.$listeners, "listeners");
  },
  components: {
    Grandson,
  },
};
</script>

<style scoped>
.box {
  background: yellowgreen;
}
</style>
